3.12 \(\int (a+a \sec (e+f x))^3 (c-c \sec (e+f x))^4 \, dx\)

Optimal. Leaf size=132 \[ -\frac{5 a^3 c^4 \tanh ^{-1}(\sin (e+f x))}{16 f}-\frac{a^3 \tan ^5(e+f x) \left (6 c^4-5 c^4 \sec (e+f x)\right )}{30 f}+\frac{a^3 \tan ^3(e+f x) \left (8 c^4-5 c^4 \sec (e+f x)\right )}{24 f}-\frac{a^3 \tan (e+f x) \left (16 c^4-5 c^4 \sec (e+f x)\right )}{16 f}+a^3 c^4 x \]

[Out]

a^3*c^4*x - (5*a^3*c^4*ArcTanh[Sin[e + f*x]])/(16*f) - (a^3*(16*c^4 - 5*c^4*Sec[e + f*x])*Tan[e + f*x])/(16*f)
 + (a^3*(8*c^4 - 5*c^4*Sec[e + f*x])*Tan[e + f*x]^3)/(24*f) - (a^3*(6*c^4 - 5*c^4*Sec[e + f*x])*Tan[e + f*x]^5
)/(30*f)

________________________________________________________________________________________

Rubi [A]  time = 0.151008, antiderivative size = 132, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 3, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.115, Rules used = {3904, 3881, 3770} \[ -\frac{5 a^3 c^4 \tanh ^{-1}(\sin (e+f x))}{16 f}-\frac{a^3 \tan ^5(e+f x) \left (6 c^4-5 c^4 \sec (e+f x)\right )}{30 f}+\frac{a^3 \tan ^3(e+f x) \left (8 c^4-5 c^4 \sec (e+f x)\right )}{24 f}-\frac{a^3 \tan (e+f x) \left (16 c^4-5 c^4 \sec (e+f x)\right )}{16 f}+a^3 c^4 x \]

Antiderivative was successfully verified.

[In]

Int[(a + a*Sec[e + f*x])^3*(c - c*Sec[e + f*x])^4,x]

[Out]

a^3*c^4*x - (5*a^3*c^4*ArcTanh[Sin[e + f*x]])/(16*f) - (a^3*(16*c^4 - 5*c^4*Sec[e + f*x])*Tan[e + f*x])/(16*f)
 + (a^3*(8*c^4 - 5*c^4*Sec[e + f*x])*Tan[e + f*x]^3)/(24*f) - (a^3*(6*c^4 - 5*c^4*Sec[e + f*x])*Tan[e + f*x]^5
)/(30*f)

Rule 3904

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_.), x_Symbol] :> Di
st[(-(a*c))^m, Int[Cot[e + f*x]^(2*m)*(c + d*Csc[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x]
&& EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && RationalQ[n] &&  !(IntegerQ[n] && GtQ[m - n, 0])

Rule 3881

Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> -Simp[(e*(e*Cot[
c + d*x])^(m - 1)*(a*m + b*(m - 1)*Csc[c + d*x]))/(d*m*(m - 1)), x] - Dist[e^2/m, Int[(e*Cot[c + d*x])^(m - 2)
*(a*m + b*(m - 1)*Csc[c + d*x]), x], x] /; FreeQ[{a, b, c, d, e}, x] && GtQ[m, 1]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int (a+a \sec (e+f x))^3 (c-c \sec (e+f x))^4 \, dx &=-\left (\left (a^3 c^3\right ) \int (c-c \sec (e+f x)) \tan ^6(e+f x) \, dx\right )\\ &=-\frac{a^3 \left (6 c^4-5 c^4 \sec (e+f x)\right ) \tan ^5(e+f x)}{30 f}+\frac{1}{6} \left (a^3 c^3\right ) \int (6 c-5 c \sec (e+f x)) \tan ^4(e+f x) \, dx\\ &=\frac{a^3 \left (8 c^4-5 c^4 \sec (e+f x)\right ) \tan ^3(e+f x)}{24 f}-\frac{a^3 \left (6 c^4-5 c^4 \sec (e+f x)\right ) \tan ^5(e+f x)}{30 f}-\frac{1}{24} \left (a^3 c^3\right ) \int (24 c-15 c \sec (e+f x)) \tan ^2(e+f x) \, dx\\ &=-\frac{a^3 \left (16 c^4-5 c^4 \sec (e+f x)\right ) \tan (e+f x)}{16 f}+\frac{a^3 \left (8 c^4-5 c^4 \sec (e+f x)\right ) \tan ^3(e+f x)}{24 f}-\frac{a^3 \left (6 c^4-5 c^4 \sec (e+f x)\right ) \tan ^5(e+f x)}{30 f}+\frac{1}{48} \left (a^3 c^3\right ) \int (48 c-15 c \sec (e+f x)) \, dx\\ &=a^3 c^4 x-\frac{a^3 \left (16 c^4-5 c^4 \sec (e+f x)\right ) \tan (e+f x)}{16 f}+\frac{a^3 \left (8 c^4-5 c^4 \sec (e+f x)\right ) \tan ^3(e+f x)}{24 f}-\frac{a^3 \left (6 c^4-5 c^4 \sec (e+f x)\right ) \tan ^5(e+f x)}{30 f}-\frac{1}{16} \left (5 a^3 c^4\right ) \int \sec (e+f x) \, dx\\ &=a^3 c^4 x-\frac{5 a^3 c^4 \tanh ^{-1}(\sin (e+f x))}{16 f}-\frac{a^3 \left (16 c^4-5 c^4 \sec (e+f x)\right ) \tan (e+f x)}{16 f}+\frac{a^3 \left (8 c^4-5 c^4 \sec (e+f x)\right ) \tan ^3(e+f x)}{24 f}-\frac{a^3 \left (6 c^4-5 c^4 \sec (e+f x)\right ) \tan ^5(e+f x)}{30 f}\\ \end{align*}

Mathematica [A]  time = 1.83372, size = 165, normalized size = 1.25 \[ \frac{a^3 c^4 \sec ^6(e+f x) \left (450 \sin (e+f x)-600 \sin (2 (e+f x))-25 \sin (3 (e+f x))-384 \sin (4 (e+f x))+165 \sin (5 (e+f x))-184 \sin (6 (e+f x))+1800 (e+f x) \cos (2 (e+f x))+720 e \cos (4 (e+f x))+720 f x \cos (4 (e+f x))+120 e \cos (6 (e+f x))+120 f x \cos (6 (e+f x))-1200 \cos ^6(e+f x) \tanh ^{-1}(\sin (e+f x))+1200 e+1200 f x\right )}{3840 f} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Sec[e + f*x])^3*(c - c*Sec[e + f*x])^4,x]

[Out]

(a^3*c^4*Sec[e + f*x]^6*(1200*e + 1200*f*x - 1200*ArcTanh[Sin[e + f*x]]*Cos[e + f*x]^6 + 1800*(e + f*x)*Cos[2*
(e + f*x)] + 720*e*Cos[4*(e + f*x)] + 720*f*x*Cos[4*(e + f*x)] + 120*e*Cos[6*(e + f*x)] + 120*f*x*Cos[6*(e + f
*x)] + 450*Sin[e + f*x] - 600*Sin[2*(e + f*x)] - 25*Sin[3*(e + f*x)] - 384*Sin[4*(e + f*x)] + 165*Sin[5*(e + f
*x)] - 184*Sin[6*(e + f*x)]))/(3840*f)

________________________________________________________________________________________

Maple [A]  time = 0.028, size = 186, normalized size = 1.4 \begin{align*} -{\frac{23\,{c}^{4}{a}^{3}\tan \left ( fx+e \right ) }{15\,f}}+{\frac{11\,{c}^{4}{a}^{3}\tan \left ( fx+e \right ) \left ( \sec \left ( fx+e \right ) \right ) ^{2}}{15\,f}}+{\frac{11\,{c}^{4}{a}^{3}\sec \left ( fx+e \right ) \tan \left ( fx+e \right ) }{16\,f}}-{\frac{5\,{c}^{4}{a}^{3}\ln \left ( \sec \left ( fx+e \right ) +\tan \left ( fx+e \right ) \right ) }{16\,f}}+{a}^{3}{c}^{4}x+{\frac{{a}^{3}{c}^{4}e}{f}}-{\frac{13\,{c}^{4}{a}^{3}\tan \left ( fx+e \right ) \left ( \sec \left ( fx+e \right ) \right ) ^{3}}{24\,f}}-{\frac{{c}^{4}{a}^{3}\tan \left ( fx+e \right ) \left ( \sec \left ( fx+e \right ) \right ) ^{4}}{5\,f}}+{\frac{{c}^{4}{a}^{3}\tan \left ( fx+e \right ) \left ( \sec \left ( fx+e \right ) \right ) ^{5}}{6\,f}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sec(f*x+e))^3*(c-c*sec(f*x+e))^4,x)

[Out]

-23/15/f*c^4*a^3*tan(f*x+e)+11/15/f*c^4*a^3*tan(f*x+e)*sec(f*x+e)^2+11/16/f*c^4*a^3*sec(f*x+e)*tan(f*x+e)-5/16
/f*c^4*a^3*ln(sec(f*x+e)+tan(f*x+e))+a^3*c^4*x+1/f*a^3*c^4*e-13/24/f*c^4*a^3*tan(f*x+e)*sec(f*x+e)^3-1/5/f*c^4
*a^3*tan(f*x+e)*sec(f*x+e)^4+1/6/f*c^4*a^3*tan(f*x+e)*sec(f*x+e)^5

________________________________________________________________________________________

Maxima [B]  time = 1.01966, size = 451, normalized size = 3.42 \begin{align*} -\frac{32 \,{\left (3 \, \tan \left (f x + e\right )^{5} + 10 \, \tan \left (f x + e\right )^{3} + 15 \, \tan \left (f x + e\right )\right )} a^{3} c^{4} - 480 \,{\left (\tan \left (f x + e\right )^{3} + 3 \, \tan \left (f x + e\right )\right )} a^{3} c^{4} - 480 \,{\left (f x + e\right )} a^{3} c^{4} + 5 \, a^{3} c^{4}{\left (\frac{2 \,{\left (15 \, \sin \left (f x + e\right )^{5} - 40 \, \sin \left (f x + e\right )^{3} + 33 \, \sin \left (f x + e\right )\right )}}{\sin \left (f x + e\right )^{6} - 3 \, \sin \left (f x + e\right )^{4} + 3 \, \sin \left (f x + e\right )^{2} - 1} - 15 \, \log \left (\sin \left (f x + e\right ) + 1\right ) + 15 \, \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 90 \, a^{3} c^{4}{\left (\frac{2 \,{\left (3 \, \sin \left (f x + e\right )^{3} - 5 \, \sin \left (f x + e\right )\right )}}{\sin \left (f x + e\right )^{4} - 2 \, \sin \left (f x + e\right )^{2} + 1} - 3 \, \log \left (\sin \left (f x + e\right ) + 1\right ) + 3 \, \log \left (\sin \left (f x + e\right ) - 1\right )\right )} + 360 \, a^{3} c^{4}{\left (\frac{2 \, \sin \left (f x + e\right )}{\sin \left (f x + e\right )^{2} - 1} - \log \left (\sin \left (f x + e\right ) + 1\right ) + \log \left (\sin \left (f x + e\right ) - 1\right )\right )} + 480 \, a^{3} c^{4} \log \left (\sec \left (f x + e\right ) + \tan \left (f x + e\right )\right ) + 1440 \, a^{3} c^{4} \tan \left (f x + e\right )}{480 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(f*x+e))^3*(c-c*sec(f*x+e))^4,x, algorithm="maxima")

[Out]

-1/480*(32*(3*tan(f*x + e)^5 + 10*tan(f*x + e)^3 + 15*tan(f*x + e))*a^3*c^4 - 480*(tan(f*x + e)^3 + 3*tan(f*x
+ e))*a^3*c^4 - 480*(f*x + e)*a^3*c^4 + 5*a^3*c^4*(2*(15*sin(f*x + e)^5 - 40*sin(f*x + e)^3 + 33*sin(f*x + e))
/(sin(f*x + e)^6 - 3*sin(f*x + e)^4 + 3*sin(f*x + e)^2 - 1) - 15*log(sin(f*x + e) + 1) + 15*log(sin(f*x + e) -
 1)) - 90*a^3*c^4*(2*(3*sin(f*x + e)^3 - 5*sin(f*x + e))/(sin(f*x + e)^4 - 2*sin(f*x + e)^2 + 1) - 3*log(sin(f
*x + e) + 1) + 3*log(sin(f*x + e) - 1)) + 360*a^3*c^4*(2*sin(f*x + e)/(sin(f*x + e)^2 - 1) - log(sin(f*x + e)
+ 1) + log(sin(f*x + e) - 1)) + 480*a^3*c^4*log(sec(f*x + e) + tan(f*x + e)) + 1440*a^3*c^4*tan(f*x + e))/f

________________________________________________________________________________________

Fricas [A]  time = 1.18828, size = 448, normalized size = 3.39 \begin{align*} \frac{480 \, a^{3} c^{4} f x \cos \left (f x + e\right )^{6} - 75 \, a^{3} c^{4} \cos \left (f x + e\right )^{6} \log \left (\sin \left (f x + e\right ) + 1\right ) + 75 \, a^{3} c^{4} \cos \left (f x + e\right )^{6} \log \left (-\sin \left (f x + e\right ) + 1\right ) - 2 \,{\left (368 \, a^{3} c^{4} \cos \left (f x + e\right )^{5} - 165 \, a^{3} c^{4} \cos \left (f x + e\right )^{4} - 176 \, a^{3} c^{4} \cos \left (f x + e\right )^{3} + 130 \, a^{3} c^{4} \cos \left (f x + e\right )^{2} + 48 \, a^{3} c^{4} \cos \left (f x + e\right ) - 40 \, a^{3} c^{4}\right )} \sin \left (f x + e\right )}{480 \, f \cos \left (f x + e\right )^{6}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(f*x+e))^3*(c-c*sec(f*x+e))^4,x, algorithm="fricas")

[Out]

1/480*(480*a^3*c^4*f*x*cos(f*x + e)^6 - 75*a^3*c^4*cos(f*x + e)^6*log(sin(f*x + e) + 1) + 75*a^3*c^4*cos(f*x +
 e)^6*log(-sin(f*x + e) + 1) - 2*(368*a^3*c^4*cos(f*x + e)^5 - 165*a^3*c^4*cos(f*x + e)^4 - 176*a^3*c^4*cos(f*
x + e)^3 + 130*a^3*c^4*cos(f*x + e)^2 + 48*a^3*c^4*cos(f*x + e) - 40*a^3*c^4)*sin(f*x + e))/(f*cos(f*x + e)^6)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} a^{3} c^{4} \left (\int 1\, dx + \int - \sec{\left (e + f x \right )}\, dx + \int - 3 \sec ^{2}{\left (e + f x \right )}\, dx + \int 3 \sec ^{3}{\left (e + f x \right )}\, dx + \int 3 \sec ^{4}{\left (e + f x \right )}\, dx + \int - 3 \sec ^{5}{\left (e + f x \right )}\, dx + \int - \sec ^{6}{\left (e + f x \right )}\, dx + \int \sec ^{7}{\left (e + f x \right )}\, dx\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(f*x+e))**3*(c-c*sec(f*x+e))**4,x)

[Out]

a**3*c**4*(Integral(1, x) + Integral(-sec(e + f*x), x) + Integral(-3*sec(e + f*x)**2, x) + Integral(3*sec(e +
f*x)**3, x) + Integral(3*sec(e + f*x)**4, x) + Integral(-3*sec(e + f*x)**5, x) + Integral(-sec(e + f*x)**6, x)
 + Integral(sec(e + f*x)**7, x))

________________________________________________________________________________________

Giac [A]  time = 1.36117, size = 271, normalized size = 2.05 \begin{align*} \frac{240 \,{\left (f x + e\right )} a^{3} c^{4} - 75 \, a^{3} c^{4} \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 1 \right |}\right ) + 75 \, a^{3} c^{4} \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 1 \right |}\right ) + \frac{2 \,{\left (315 \, a^{3} c^{4} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{11} - 1945 \, a^{3} c^{4} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{9} + 5118 \, a^{3} c^{4} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{7} - 3138 \, a^{3} c^{4} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{5} + 1095 \, a^{3} c^{4} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} - 165 \, a^{3} c^{4} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )\right )}}{{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - 1\right )}^{6}}}{240 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(f*x+e))^3*(c-c*sec(f*x+e))^4,x, algorithm="giac")

[Out]

1/240*(240*(f*x + e)*a^3*c^4 - 75*a^3*c^4*log(abs(tan(1/2*f*x + 1/2*e) + 1)) + 75*a^3*c^4*log(abs(tan(1/2*f*x
+ 1/2*e) - 1)) + 2*(315*a^3*c^4*tan(1/2*f*x + 1/2*e)^11 - 1945*a^3*c^4*tan(1/2*f*x + 1/2*e)^9 + 5118*a^3*c^4*t
an(1/2*f*x + 1/2*e)^7 - 3138*a^3*c^4*tan(1/2*f*x + 1/2*e)^5 + 1095*a^3*c^4*tan(1/2*f*x + 1/2*e)^3 - 165*a^3*c^
4*tan(1/2*f*x + 1/2*e))/(tan(1/2*f*x + 1/2*e)^2 - 1)^6)/f